package com.xian.zk.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @program: xlive
 * @description: server 节点对象
 * @author: liru.xian
 * @create: 2021/12/26、17:02
 **/
@Data
@ApiModel("server 节点对象")
@Configuration
@ConfigurationProperties(prefix = "x.zk.node")
@EqualsAndHashCode
public class ServerNode implements Serializable {

    @ApiModelProperty("serviceName")
    /**
     * Service information of instance.
     */
    private String serviceName;
    @ApiModelProperty("groupName 群组")
    private String groupName = "default";
    @ApiModelProperty("clusters 集群")
    private String clusters ="default";
    private List<Instance> hosts = new ArrayList<>();
}
